<template>
  <div class="dashboard-container">
    <div class="dashboard-text">
      <el-card>
        <el-row type="flex" justify="space-between">
          <div class="tl" />
          <div class="tr">
            <iframe scrolling="no" src="https://tianqiapi.com/api.php?style=ts&skin=durian" frameborder="0" width="500" height="220" allowtransparency="true" />
          </div>
        </el-row>
      </el-card>
      <el-card body-style="height: '500px', margin-top: '20px'">
        <el-carousel height="450px">
          <el-carousel-item v-for="item in image" :key="item.id">
            <el-image :src="item.imageSrc" />
            <!-- <img :src="item" alt=""> -->
          </el-carousel-item>
        </el-carousel>
      </el-card>
    </div>
  </div>
</template>

<script>
import { mapGetters } from 'vuex'

export default {
  name: 'Dashboard',
  data() {
    return {
      image: [
        { id: 1, imageSrc: require('../../assets/common/one.jpg') },
        { id: 2, imageSrc: require('../../assets/common/two.jpg') },
        { id: 3, imageSrc: require('../../assets/common/three.jpg') },
        { id: 4, imageSrc: require('../../assets/common/four.jpg') }
      ]
    }
  },
  computed: {
    ...mapGetters([
      'name'
    ])
  }
}
</script>

<style lang="scss" scoped>
.dashboard {
  &-container {
    margin: 30px;
  }
  &-text {
    font-size: 30px;
    line-height: 46px;
  }
}
.el-carousel__item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  .carousel-image {
    max-width: 100%;
    max-height: 100%;
  }
}
</style>
